<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title><?=$da['title']?></title>
	<script type="text/javascript" src="web/res/js/jquery.1.9.1.min.js"></script>
	<script type="text/javascript" src="mode/layer/layer.js"></script>
	<script type="text/javascript" src="js/js.js"></script>
	<script type="text/javascript" src="js/base64-min.js"></script>
	<script type="text/javascript" src="mode/ukey/Syunew.js"></script>
	<script type="text/javascript" src="<?=$da['p']?>/<?=$da['d']?><?=$da['m']?>/<?=$da['m']?>script.js"></script>
	<style>
		html,body{margin:0;padding:0;position: relative;min-width: 1100px;min-height: 750px;height: 100%;}
		body,input,button{color:unset;font-size:14px;word-wrap:break-word;font-family:verdana,"Microsoft YaHei","PingFang SC"}
		body{background-color: #fff;}
		header, footer{color:#666666;height:120px;display:flex;align-items:center;width: 1000px;margin: 0 auto;justify-content:center;}
		footer{position: absolute;bottom: 0;width: 100%;flex-direction: column;}
		main{display:flex;flex-flow:row;justify-content:center;align-items: center;box-sizing: border-box;
			position: absolute;top: 120px;bottom:120px;width: 100%;
			background-image: url('images/bg.png');
			background-repeat: no-repeat;
			/*background-size: 40%;*/
			background-size:cover;
			/*background-position:20% 50%;*/
		}
		left{background-image: url("images/pt.png");background-size: cover;width: 577px;height: 435px;}
		header h1{letter-spacing:2px;font-size:36px;margin:0;font-weight: bolder;color: #666;font-family: '楷体';}
		header .subtit{margin-top: 5px;font-size: 16px;text-align: center;color: #eee;}
		header p,footer>p{font-size:14px;margin:0;line-height: 32px;color: #888;}
		footer a{color:white;}
		#imglogo{display:flex;border:3px solid white;border-radius:50%;margin:10px auto;font-size:0;}
		.form-box{background-color: #fff;border-radius: 3px;border: 10px solid #007fe1;margin-left: 11em;}
		form{text-align:center;*box-shadow:0 0 1em black;width: 280px;padding: 0 2em 3em 2em;margin-top: 10px;
			/*border: 10px solid #4da8e9;border-radius: 3px;*/
			overflow: hidden;}
		.input{border:none;border-left:1px solid #e0e0e0;height:30px;background-color:#fff!important;color:dodgerblue;padding:0 1em;outline: none;}
		label{display:block;margin:10px 0;text-align: left;color:dodgerblue;display:flex;align-items:center;}
		button{width:100%;height:40px;background-color: #007fe1;color:white;border:none;border-radius:5px;margin:10px 0;font-size: 18px;cursor: pointer;letter-spacing: 5px;}
		.button{width:15%;height:30px;background-color: #007fe1;color:white;border:none;border-radius:5px;margin:5px 0;font-size: 12px;cursor: pointer;letter-spacing: 3px;}
		.desc {padding-top: 5px;}
		.desc div{color: dodgerblue;font-size: 15px;font-weight: normal;padding: 0 10px;line-height: 1.4;text-align: left;}
		.row{overflow: hidden;border: 1px solid #c7c7c7;margin-top: 15px;background: #fff;border-radius: 5px;}
		.row i{width: 40px;height: 40px;display: inline-block;background-position: center;background-repeat: no-repeat;float: left;}
		.row i.i-username{background-image: url("images/admin.png")}
		.row i.i-password{background-image: url("images/password.png")}
		.row i.i-viricode{background-image: url("images/yanzheng.png")}
		.row .input{float: left;height: 40px;width: 70%;padding-left: 16px;background: #fff;}
		.row .input[type=password]{background: #fff!important;}
		.tit{font-size: 18px;text-align: center;height: 50px;line-height: 50px;
			color: #007fe1;font-weight: normal;background-color: #fff;border-bottom: 1px solid #ccc;
			margin: 0;
		}
	</style>
</head>
<?php if($da['ukeySwitch'] == 1){?>
<body onload="js.load();js.getChipId();">
<?php }else{?>
<body>
<?php }?>

<header>
	<div class="container">
		<h1><?=$da['title']?></h1>
		<!--			<div class="subtit">电子化&nbsp;规范化&nbsp;专业化</div>-->
		<!--			<p>Inner Mongolia Sports Bureau Purchase Management System</p>-->
	</div>
</header>
<main>
	<left></left>
	<div class="form-box">
		<h3 class="tit">用户登录</h3>
		<form name="myform" style="padding: 0 2em 2em 2em;">
			<div id="loginview0">
				<div class="row">
					<i class="i-username"></i>
					<input type="text" class="input" onKeyUp="if(event.keyCode==13)getpassobj().focus()" value="<?=$da['ca_adminuser']?>"  placeholder="请输入用户名/姓名/手机号/邮箱" name="adminuser">
				</div>
				<div class="row">
					<i class="i-password"></i>
					<input class="input"  onKeyUp="if(event.keyCode==13)loginsubmit()" value="<?php if($da['ca_rempass']=='1')echo $da['ca_adminpass'];?>"   type="password" placeholder="请输入密码">
				</div>
				<?php if($da['ukeySwitch'] == 1){?>
				<div class="row" style="position: relative;">
					<i class="i-viricode"></i>
					<div>
						<input class="input" id="encryptKey" value="" type="text" readonly placeholder="ukey">
						<!--							<input type="button" class="button" onclick="refresh()" value="刷新">-->
					</div>
					<input class="input" name="ukeySwitch" value="1" type="hidden">
					<?php }else{ ?>
					<input class="input" name="ukeySwitch" value="0" type="hidden">
					<?php }?>
					<input class="input" id="ukey" name="ukey" value="" type="password" style="display: none">
				</div>
<!--				<div>-->
<!--					<label>-->
<!--						<input type="checkbox" <?php if($da['ca_rempass']=='1')echo 'checked';?> name="rempass">-->
<!--						记住密码-->
<!--					</label>-->
<!--				</div>-->

				<div>
					<button type="button" onClick="loginsubmit()" name="button">登录</button>
					<span id="msgview"></span>
				</div>

				<div class="desc" style="line-height:50px;">
					<div style="text-align: center">首次使用请<a href="./SetUp.exe" style="color: red">下载驱动程序</a>并安装<br/></div>
					<div style="text-align: center">请使用谷歌或火狐浏览器</div>
				</div>
			</div>
		</form>
	</div>
</main>
<footer>
	<!--	<p>&#169;<?=date('Y')?> <?=$da['title']?> V<?=VERSION?></p>-->
	<!--				<p>技术公司</p>-->
	<p>主办单位：内蒙古自治区XXX &nbsp;&nbsp;&nbsp;| &nbsp;&nbsp;&nbsp; 技术支持：内蒙古中采信息技术有限公司 &nbsp;&nbsp;&nbsp;| &nbsp;&nbsp;&nbsp; 联系电话：15248157820 &nbsp;&nbsp;&nbsp;| &nbsp;&nbsp;&nbsp;技术交流QQ群：1080020737</p>
</footer>
</body>
</html>
<script>
	function refresh() {
		js.getChipId();
		setValue();
	}
	function setValue() {
		setTimeout(function () {
			var key = $("#ukey").val();
			key = js.plusXing(key, false, 4, 4);
			$("#encryptKey").val(key);
		}, 100);
	}
	setValue();
</script>